package com.ten.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ten.common.core.entity.EduCourse;
import com.ten.common.core.entity.EduTeacher;
import com.ten.common.core.vo.Result;
import com.ten.order.dao.ByTeacherNameDao;
import com.ten.order.service.ByTeacherNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：王薪伟
 * @date ：Created in 2022/12/8 21:15
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class ByTeacherNameServiceImpl implements ByTeacherNameService {

    @Autowired
    private ByTeacherNameDao teacherNameDao;

    @Override
    public Result<EduTeacher> findByTeacherName(String teacherName) {
//        QueryWrapper<EduTeacher> wrapper = new QueryWrapper<>();
//        wrapper.eq("name", teacherName);
        EduTeacher teacher = teacherNameDao.selectByTeacherName(teacherName);
        return new Result<EduTeacher>(2000, "查询成功", teacher);
    }
}
